package com.card.hwatt.entity;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;

/**
 * 巡检
 * 
 * @author Administrator
 * 
 */
@Entity
@Table(name = "T_NightCheck")
public class NightCheck {

	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "assigned")
	@Column(name = "NightCheckID", length = 36)
	@Type(type = "uuid-char")
	public UUID id;

	/**
	 * 班次
	 */
	@ManyToOne(cascade = {})
	@JoinColumn(name = "ScheduleID", nullable = false)
	@Type(type = "uuid-char")
	public Schedule schedule;

	/**
	 * 开始时间
	 */
	@Column(name = "StartTime", length = 4, nullable = true)
	public String startTime;

	/**
	 * 结束时间
	 */
	@Column(name = "EndTime", nullable = true)
	public Integer endTime;

	/**
	 * 排序
	 */
	@Column(name = "OrderBy", nullable = false)
	public int orderBy;
}
